package com.yun.service.Impl;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.yun.dao.FileDao;
import com.yun.entity.Files;
import com.yun.service.FileService;

@Service
public class FileServiceImpl implements FileService {
	@Resource
	private FileDao fileDao;

	@Override
	public int addFile(Files file) {

		return fileDao.addFile(file);
	}

	@Override
	public List<Files> readFile(int userId) {
		// TODO Auto-generated method stub
		return fileDao.readFile(userId);
	}

	@Override
	public List<Files> readFileByTypeId(Files file) {
		// TODO Auto-generated method stub
		return fileDao.readFileByTypeId(file);
	}

	@Override
	public int delFileByFileId(Integer fileId) {
		// TODO Auto-generated method stub
		return fileDao.delFileByFileId(fileId);
	}

	@Override
	public Files selectByFileId(int fileId) {
		// TODO Auto-generated method stub
		return fileDao.selectByFileId(fileId);
	}
}
